home *** CD-ROM | disk | FTP | other *** search
- #define UCHAR unsigned char
- #define ULONG unsigned long
- #define UINT unsigned int
- #define USHORT unsigned short int
-
- #define FP_MAK(fp, off, seg) \
- ((*(((USHORT *)&(fp)) + \
- sizeof(UINT)/sizeof(USHORT)) = \
- (USHORT) (seg)), (*(UINT *)&(fp) = (UINT)(off)))
-
- #define RFP_MAK(rfp, off, seg) \
- (*(((USHORT *)&(rfp)) + 1) = \
- (USHORT)(seg)),(*(USHORT *)&(rfp) = (USHORT)(off))
-
- #define RFP_LINEAR(rfp) \
- (((rfp) & 0xFFFF) + (((rfp) & 0xFFFF0000) >> 12))
-
- #define MAKE_WORD(hc, lc) \
- ((((USHORT)(hc)) << 8) + (USHORT)(lc))
- #define HIGH_BYTE(word) ((UCHAR)((word) >> 8))
- #define LOW_BYTE(word) ((UCHAR)((word) & 0xFF))
-
- #define DOS_REALMODE 0
- #define PHARLAP_386 1
- #define ERGO_OS286 2
- #define ERGO_OS386 3
-
- #ifdef __HIGHC__
- #define max _max
- #define min _min
- #endif
-
- #ifdef __WATCOMC__
- #ifdef __386__
- #define AX eax
- #define BX ebx
- #define CX ecx
- #define DX edx
- #define DI edi
- #define SI esi
- #define int86 int386
- #define int86x int386x
- #pragma aux OUR_C "_*" \
- parm caller [] \
- value struct float struct routine [eax] \
- modify [eax ebx ecx edx esi edi fs gs];
- #else
- #pragma aux OUR_C "_*" \
- parm caller [] \
- value struct float struct routine [ax] \
- modify [ax bx cx dx es si di];
- #endif
- #else
- #define AX ax
- #define BX bx
- #define CX cx
- #define DX dx
- #define DI di
- #define SI si
- #endif
-
-